import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    LOADING: false,
    LOADINGINDEX: 0,
    LOADINGIMAGE: [
      "./img/Loading/load-1.gif",
      "./img/Loading/load-2.gif",
      "./img/Loading/load-3.gif",
      "./img/Loading/load-4.gif",
      "./img/Loading/load-5.gif",
      "./img/Loading/load-6.gif",
      "./img/Loading/load-7.gif",
    ],
  },
  getters: {
  },
  mutations: {
    showLoading(state) {
      state.LOADINGINDEX = Math.floor(Math.random() * state.LOADINGIMAGE.length)
      state.LOADING = true
    },
    hideLoading(state) {
      state.LOADING = false
    }
  },
  actions: {
  },
  modules: {
  }
})
